import pyautogui
import time


def wait_for_image(image_path, timeout=10):
    start_time = time.time()
    while time.time() - start_time < timeout:
        location = pyautogui.locateOnScreen(image_path, confidence=0.6)
        if location:
            return location
        time.sleep(1)
    return False
